Linux webm002.cluster126.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64
/
home
/
ariannadhf
/
www
/
wp-content
/
plugins
/
code-snippets
/
js
/
/home/ariannadhf/www/wp-content/plugins/code-snippets/js/editor.ts
import { defineMode, getMode, registerHelper } from 'codemirror' import { Linter } from './utils/Linter' import type { EditorConfiguration, ModeSpec } from 'codemirror' interface ModeSpecOptions { startOpen: boolean } const mode: ModeSpec<ModeSpecOptions> = { name: 'application/x-httpd-php', startOpen: true } defineMode('php-snippet', (config: EditorConfiguration) => getMode(config, mode)) registerHelper('lint', 'php', (text: string) => { const linter = new Linter(text) linter.lint() return linter.annotations })